#pragma once
#include <unordered_map>
#include "SFML\Window\Keyboard.hpp"
#include "IUpdateable.hpp"

namespace rh
{
	enum KeyState
	{
		Inactive = 0,
		Hold = 1,
		Released = 2,
		Pressed = 3
	};

	class KeyboardInput //: rh::IUpdateable
	{
	public:

		KeyboardInput(void);
		~KeyboardInput(void);
	private:
		typedef std::unordered_map<sf::Keyboard::Key, KeyState, std::hash<int>> KeyMap;
		static KeyMap _keyStateMap;
	public:
		static void RegisterKey(const sf::Keyboard::Key&);
		static void UnregisterKey(const sf::Keyboard::Key&);

		static void Update(const sf::Time& elapsedTime, const sf::Time& totalElapsedTime);

		static KeyState GetKeyState(sf::Keyboard::Key);
	};
}